package com.weixin.xplore;


import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;

@Slf4j
@EntityScan(basePackages = {"com.weixin.xplore.**.entity"})
@SpringBootApplication
@EnableScheduling
@ComponentScan(basePackages = {"org.anyline","com.weixin.xplore"})
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Application {
    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(Application.class);
//        springApplication.setBannerMode(Banner.Mode.OFF);
        ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
        Environment env = configurableApplicationContext.getEnvironment();
        log.info("""
                        
                        ----------------------------------------------------------
                        Application is running! Access URLs:
                        Local:    http://localhost:{}
                        Doc:      http://localhost:{}/doc.html
                        ----------------------------------------------------------""",
                env.getProperty("server.port"),
                env.getProperty("server.port"));
    }
}